package com.upup.train_management.service;

import com.upup.train_management.entity.Route;
import com.upup.train_management.entity.RouteStation;
import com.upup.train_management.entity.Station;

import java.util.List;

public interface RouteService {
    List<Route> getAllRoutes();
    Route getRouteById(Long id);
    Route saveRoute(Route route);
    void deleteRoute(Long id);
    List<Route> getRoutesByStartStation(Long startStationId);
    List<Route> getRoutesByEndStation(Long endStationId);
    List<Route> searchRoutes(Long startStationId, Long endStationId);
    List<Station> getStationsInRoute(Long routeId);
    void addStationToRoute(RouteStation routeStation);
    void removeStationFromRoute(Long routeId, Long stationId);
    void updateRouteStationOrder(Long routeId, Long stationId, Integer newOrder);
    Double calculateRouteDistance(Long routeId);
    List<Route> searchRoutesByCity(String startCity, String endCity);
    List<Route> getMostPopularRoutes(Integer limit);
}